The Query Builder HTC lets users build queries easily and intuitively. This page demonstrates its basic functionality. It also includes a basic description of the Query Builder's programmatic interface.
Set the Query Builder's edit-mode:
Edit a query.
View a query.
Current Query XML:
| onReady |
Indicates that the Query Builder is fully loaded and initialized,
and that its programmatic interface is ready to use. Any app that
intends to interact with the Query Builder's programmatic
interface should ensure that they do this AFTER this event fires.
event object propertiesnone |
| onActive |
This event fires when the Query Builder finally enters the active
state after Activate() has been called. The reason for this event
is that activation may fail if one or more of the XML files this
control depends on cannot be found. This event is particularly
useful when the Query Builder is being used inside of another
UI-widget that cannot itself enter an activated state until all
subcomponents have successfully activated.
event object propertiesnone |
| onError |
This event fires when activation of the Query Builder fails at
any point. Keep in mind that the Activate method may return a success
value, but an onError event later fires as well because some
unexpected error takes place as activation continues. No error message
is returned with the event, but if the Query Builder is in debug
mode, an error is displayed to the user before the event fires.
event object propertiesnone |
| onQueryChange |
This event fires when the current query body changes. Things that
cause this event to fire are the addition or modification of a
query clause, or the deletion of one or more query clauses.
event object propertiesnone |
| bSuccess = divQueryBldr.Activate(bEdit) |
Activates the Query Builder.
parametersbEdit (Required) Boolean. If true, the displayed query may be modified by the user. If false, the query is displayed read-only. return valuebSuccess Boolean. If a fatal error occurs during this function's operation, returns false. Otherwise it returns true. |
| divQueryBldr.Deactivate() |
Deactivates the Query Builder and disables all controls.
parametersnone return valuenone remarksNote that this does not clear the current query from the Query Builder. |
| arProfileList = divQueryBldr.GetProfileList() |
Returns a list of the names of all profiles that are currently loaded
into the Query Builder.
parametersnone return valuearProfileList VBScript SAFEARRAY. Array of profile names. |
| bSuccess = divQueryBldr.SetExprBody(sExpr) |
Loads the query represented by sExpr into the Query Builder.
parameterssExpr (Required) String. Contains XML defining a valid query. return valuebSuccess Boolean. Returns false if parsing of the expression-body fails. Returns true if parsing of the expression-body succeeds. remarksAn empty string or Null can be passed in to clear the current query. |
| bSuccess = divQueryBldr.SetExprBodyXML(xmlExpr) |
Loads the query represented by xmlExpr into the Query Builder.
parametersxmlExpr (Required) Microsoft.XMLDOM. XML defining a valid query. return valuebSuccess Boolean. Returns false if parsing of the expression-body fails. Returns true if parsing of the expression-body succeeds. remarksA value of Nothing can be passed in to clear the current query. |
| sExpr = divQueryBldr.GetExprBody() |
Returns the current expression body.
parametersnone return valuesExpr String. Contains the XML of the current expression body. remarksIf there isn't currently any query, this function returns Null. |
| xmlExpr = divQueryBldr.GetExprBodyXML() |
Returns the current expression body.
parametersnone return valuexmlExpr Microsoft.XMLDOM. Contains the current expression body. remarksIf there isn't currently any query, this function returns Null. |
| divQueryBldr.SetExprListXML(xmlExprList) |
Allows the caller to give the Query Builder a set of expressions that
the Query Builder can use to build other expressions. This will
almost never be used when the Query Builder is being used by itself.
The Expression Builder uses this function to hand the Query Builder
a list of expressions.
parametersxmlExprList (Required) Microsoft.XMLDOM. XML defining a list of expressions. return valuenone remarksPassing Nothing as the argument will simply cause the Query Builder to not allow the user to insert existing expressions into the current expression. |
| XMLConfigID | ID of an XML data-island from which the Query Builder can load its configuration information. |
| AutoActivate | If true, the Query Builder automatically activates upon completion of loading. The Query Builder is activated in edit-mode. |
| bReady = divQueryBldr.IsReady |
| Indicates whether the Query Builder is ready or not. This property is false before the onReady event fires, and is true after the onReady event fires. It is provided so that external components can determine if the Query Builder is ready to be used without using events. |
| bActive = divQueryBldr.IsActive |
| Indicates whether the Query Builder is currently active or not. This property is true when the Query Builder is active (ie. the user can interact with the Query Builder) and false when it is inactive. |
KEY: <NodeTag> <RepeatingNodeTag*> @attribute
<XML ID="xmlisConfig">
<EBCONFIG>
<DEBUG />
<EXPR-ASP>/retailbizdesk/exprarch</EXPR-ASP>
<SITE-TERMS URL='SiteTerms.xml' />
<PROFILE-LIST>
<PROFILE SRC="NonUPMProfDefs.asp" />
<PROFILE>Profile Definitions.UserObject</PROFILE>
</PROFILE-LIST>
<EEE-INTRINSICS />
<ADVANCED />
</EBCONFIG>
</XML>